﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControls_News_Detail : bzUCBase
{
    public string _ID = "-1";
    public DataRow _dr = null;
    private string _CateID = "-1";
    public DataTable dt = new DataTable();
    public DataTable dtCate = new DataTable();
    public string NamCate = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        _ID = Request.QueryString["ID"] == null ? "-1" : Request.QueryString["ID"];
        _CateID = Request.QueryString["CateID"] == null ? "-1" : Request.QueryString["CateID"];
        this.initSiteLang(bzSiteOption.Group.Limit, bzSiteOption.Note.NewsOne, bzLang.Note_NewsOne);
        dt = new bzService().getRecord(_ID, "1");
        if (dt.Rows.Count > 0)
        {
            _dr = dt.Rows[0];
            dtCate = new bzServiceCate().getRecord(dt.Rows[0]["CateID"].ToString());
        }
        int limit = Convert.ToInt32(this.SiteOption["LimitItem_News"]);
        long total = new bzNewsOne().getTotal("", "1", "-1", _CateID);
        //  this.loadPaginationReplaceURL(total, 1, bzStringClass.Root + "tin-tuc" + _CateID);
        this.loadPaginationAjax(total - 1, limit, bzStringClass.Root + "Request.aspx?Act=NewsOne&ID=" + _ID, 0);
        dt = new bzService().getTableOther(_ID, this.PageNum, limit.ToString(), "1", "-1", "-1");


    }
    public string RequestParas()
    {
        string strParas = "";
        if (Request.Params["ID"] != null)
        {
            strParas = Request.Params["ID"].ToString();
        }
        return strParas;
    }
}
